<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>显示隐藏密码明文</title>
</head>
<body>
    <input type="password" id="passwordInput">
    <script>function togglePasswordVisibility() {
        var passwordInput = document.getElementById("passwordInput");
        var toggleImage = document.getElementById("toggleImage");
    
        if (passwordInput.type === "password") {
            passwordInput.type = "text";
            toggleImage.src = "openEye.png";
        } else {
            passwordInput.type = "password";
            toggleImage.src = "closedEye.png";
        }
    }</script>
</body>
</html>